package com.riant.bean.response;

/**
 * @Classname BaseRes
 * @Description TODO
 * @Date 2022/4/30 22:54
 * @Created by 张斌
 */
public class BaseRes<T> {

    private String code;
    private String msg;
    private T data;

    public BaseRes() {
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "BaseRes{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }

    public static BaseRes success(){
        final BaseRes<Object> successBaseRes = new BaseRes<>();
        successBaseRes.setCode("000000");
        successBaseRes.setMsg("success");
        return successBaseRes;
    }
}
